package com.qqs.distributed.lock;

import com.qqs.distributed.advice.CacheAttributeWrapper;
import org.apache.zookeeper.ZooKeeper;

public class ZookeeperLockHandlerFactory extends AbstractLockHandlerFactory {
    private ZooKeeper zooKeeper;

    public ZookeeperLockHandlerFactory(ZooKeeper zooKeeper) {
        this.zooKeeper = zooKeeper;
    }

    @Override
    public LockHandler produce(CacheAttributeWrapper attributeWrapper) {
        return new ZookeeperLockHandler(attributeWrapper, zooKeeper);
    }
}
